package com.yykj.common.exception;

import com.yykj.common.enums.ResultEnums;
import lombok.Getter;

@Getter
public class FeignClientException extends RuntimeException {
    private Integer code;

    private String msg;

    public FeignClientException(ResultEnums resultEnums) {
        this.code = resultEnums.getCode();
        this.msg = resultEnums.getMessage();
    }

    public FeignClientException(ResultEnums resultEnums, String message) {
        this.code = resultEnums.getCode();
        this.msg = message;
    }
    public FeignClientException(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

}
